use std::fmt::{Display, Formatter};
use crate::lexer_mod::token_type_enum;

#[derive(Debug)]
pub struct Token {
    ///行数
    pub line: i32,
    ///行数的第几个字符
    pub row: i32,
    pub token_type: token_type_enum::TokenType,
}
impl Display for Token {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            "行：{},项：{}，Token:{:?})",
            self.line, self.row, self.token_type
        )
    }
}
